from django.db import models


class Villager(models.Model):
    """
    村民
    """
    group = models.IntegerField(verbose_name="组别")

    house_number = models.IntegerField(verbose_name="门牌号")

    fullname = models.CharField(max_length=24, verbose_name="姓名")

    gender = models.CharField(max_length=12, verbose_name="性别")

    id_card = models.CharField(max_length=24, verbose_name="身份证")

    relationship = models.CharField(max_length=12, verbose_name="与户主关系")

    phone_number = models.CharField(max_length=12, verbose_name="电话")

    registered_residence = models.CharField(max_length=128, verbose_name="户籍所在地")

    current_residence = models.CharField(max_length=128, verbose_name="现住地")

    work_units = models.CharField(max_length=64, verbose_name="工作单位")

    political_status = models.CharField(max_length=12, verbose_name="政治面貌")

    homestead_area = models.FloatField(verbose_name="宅基地面积")

    education_level = models.CharField(max_length=12, verbose_name="文化程度")

    graduated_school = models.CharField(max_length=64, verbose_name="毕业院校")


class Women(models.Model):
    """
    妇女模块
    """
    fullname = models.CharField(max_length=24, verbose_name="姓名")

    gender = models.CharField(max_length=12, verbose_name="性别")

    birth_date = models.DateTimeField(verbose_name="出生日期")

    marry_date = models.DateTimeField(verbose_name="初婚日期")

    marry_status = models.CharField(max_length=12, verbose_name="婚姻状态")

    id_card = models.CharField(max_length=24, verbose_name="身份证")

    registered_residence = models.CharField(max_length=128, verbose_name="户籍所在地")

    spouse_name = models.CharField(max_length=24, verbose_name="配偶姓名")

    spouse_id_card = models.CharField(max_length=24, verbose_name="配偶身份证")

    children_number = models.IntegerField(verbose_name="孩子数")

    phoneNumber = models.CharField(max_length=12, verbose_name="电话")


class Project(models.Model):
    """
    工程管理
    """
    project_name = models.CharField(max_length=64, verbose_name="工程名字")

    project_amount = models.CharField(max_length=24, verbose_name="工程量")

    tender_method = models.CharField(max_length=24, verbose_name="招标方式")

    construction_unit = models.CharField(max_length=64, verbose_name="施工单位")

    budget = models.FloatField(verbose_name="预算金额")

    bid = models.FloatField(verbose_name="中标金额")

    final = models.FloatField(verbose_name="决算金额")

    project_progress = models.CharField(max_length=12, verbose_name="工程进度")

    payment_type = models.CharField(max_length=12, verbose_name="付款方式")

    payment_status = models.CharField(max_length=12, verbose_name="付款状态")


class Asset(models.Model):
    """
    资产表
    """
    workshop = models.CharField(max_length=128, verbose_name="厂房管理")

    land_area = models.FloatField(verbose_name="土地面积")

    address = models.CharField(max_length=128, verbose_name="地址")

    building_area = models.FloatField(verbose_name="房屋面积")

    ownership = models.CharField(max_length=24, verbose_name="所有权")

    land_ownership = models.CharField(max_length=24, verbose_name="土地所有权")

    building_ownership = models.CharField(max_length=24, verbose_name="房屋所有权")

    contacts = models.CharField(max_length=24, verbose_name="联系人")

    note = models.CharField(max_length=255, verbose_name="备注")
    

class Religion(models.Model):
    """
    宗教
    """
    place_name = models.CharField(max_length=64, verbose_name="场所名称")

    faith_type = models.CharField(max_length=24, verbose_name="信仰类型")

    location = models.CharField(max_length=64, verbose_name="详细地址")

    building_date = models.DateTimeField(verbose_name="建筑年代")

    header = models.CharField(max_length=24, verbose_name="负责人")

    id_card = models.CharField(max_length=24, verbose_name="身份证")

    phoneNumber = models.CharField(max_length=12, verbose_name="电话")


class Enterprise(models.Model):
    """
    企业
    """
    company = models.CharField(max_length=24, verbose_name="企业名称")

    register_date = models.DateTimeField(verbose_name="注册时间")

    legal_person = models.CharField(max_length=24, verbose_name="法人")

    legal_person_id = models.CharField(max_length=24, verbose_name="身份证")

    legal_person_phone = models.CharField(max_length=12, verbose_name="法人联系方式")

    environmental = models.CharField(max_length=128, verbose_name="环保")

    security = models.CharField(max_length=128, verbose_name="安全")

    header = models.CharField(max_length=24, verbose_name="负责人")

    header_phone = models.CharField(max_length=12, verbose_name="负责人联系方式")

    location = models.CharField(max_length=64, verbose_name="地址")

    business_license = models.CharField(max_length=64, verbose_name="营业执照")


class Nine(models.Model):
    """
    九小
    """
    shop = models.CharField(max_length=24, verbose_name="店铺名称")

    legal_person = models.CharField(max_length=24, verbose_name="法人")

    legal_person_id = models.CharField(max_length=24, verbose_name="身份证")

    phone = models.CharField(max_length=12, verbose_name="联系方式")

    location = models.CharField(max_length=64, verbose_name="地址")

    business_license = models.CharField(max_length=64, verbose_name="营业执照")


class NewCitizen(models.Model):
    """
    新市民
    """
    tenant_number = models.CharField(max_length=24, verbose_name="出租户编号")

    fullname = models.CharField(max_length=24, verbose_name="出租户姓名")

    phone_number = models.CharField(max_length=12, verbose_name="联系电话")

    tenant_type = models.CharField(max_length=12, verbose_name="租住类型")

    tenant_location = models.CharField(max_length=64, verbose_name="出租屋地址")

    tenant_person_number = models.IntegerField(verbose_name="出租人数")


class PartyMember(models.Model):
    """
    党员
    """
    fullname = models.CharField(max_length=24, verbose_name="党员姓名")

    gender = models.CharField(max_length=12, verbose_name="性别")

    id_card = models.CharField(max_length=24, verbose_name="身份证")

    party_date = models.DateTimeField(verbose_name="入党日期")

    party_organization = models.CharField(max_length=24, verbose_name="党组织")

    party_position = models.CharField(max_length=24, verbose_name="党内职务")

    education_level = models.CharField(max_length=12, verbose_name="文化程度")

    work_units = models.CharField(max_length=64, verbose_name="工作单位")

    current_residence = models.CharField(max_length=128, verbose_name="现住地")

    phone_number = models.CharField(max_length=12, verbose_name="电话")


class Handicapped(models.Model):
    """
    残疾人表
    """
    fullname = models.CharField(max_length=24, verbose_name="党员姓名")

    gender = models.CharField(max_length=12, verbose_name="性别")

    id_card = models.CharField(max_length=24, verbose_name="身份证")

    telephone = models.CharField(max_length=12, verbose_name="电话号码")

    cellphone = models.CharField(max_length=12, verbose_name="手机号码")

    registered_residence = models.CharField(max_length=128, verbose_name="户籍所在地")

    current_residence = models.CharField(max_length=128, verbose_name="现住地")

    disability_types = models.CharField(max_length=24, verbose_name="残疾类别")

    disability_level = models.CharField(max_length=24, verbose_name="残疾等级")

    disability_description = models.TextField(verbose_name="残疾明细")

    disability_number = models.CharField(max_length=24, verbose_name="残疾证号")

    issue_date = models.DateTimeField(verbose_name="发证日期")

    review_date = models.DateTimeField(verbose_name="年审日期")

    subsidy = models.FloatField(verbose_name="民政补贴")


class Veterans(models.Model):
    """
    退役军人
    """
    fullname = models.CharField(max_length=24, verbose_name="姓名")

    gender = models.CharField(max_length=12, verbose_name="性别")

    id_card = models.CharField(max_length=24, verbose_name="身份证")

    national = models.CharField(max_length=12, verbose_name="民族")

    birth_date = models.DateTimeField(verbose_name="出生日期")

    personnel_category = models.CharField(max_length=12, verbose_name="人员类别")

    registered_category = models.CharField(max_length=12, verbose_name="户籍类别")

    registered_residence = models.CharField(max_length=128, verbose_name="户籍所在地")

    political_status = models.CharField(max_length=12, verbose_name="政治面貌")

    education_level = models.CharField(max_length=12, verbose_name="文化程度")

    current_residence = models.CharField(max_length=128, verbose_name="家庭住址")

    marry_status = models.CharField(max_length=12, verbose_name="婚姻状态")

    work_units = models.CharField(max_length=64, verbose_name="工作单位")

    phone_number = models.CharField(max_length=12, verbose_name="电话")

    gatherer = models.CharField(max_length=12, verbose_name="采集人")

    gatherer_unit = models.CharField(max_length=64, verbose_name="采集单位")

    administrative_division = models.CharField(max_length=64, verbose_name="行政区划")


class LowIncome(models.Model):
    """
    低保
    """
    fullname = models.CharField(max_length=24, verbose_name="户主姓名")

    id_card = models.CharField(max_length=24, verbose_name="身份证")

    low_number = models.CharField(max_length=24, verbose_name="低保证号")

    low_description = models.TextField(verbose_name="致贫原因")

    family_number = models.IntegerField(verbose_name="家庭人口")

    security_number = models.IntegerField(verbose_name="保障人口")

    current_residence = models.CharField(max_length=128, verbose_name="现住地")

    phone_number = models.CharField(max_length=12, verbose_name="电话")

    bank_card = models.CharField(max_length=24, verbose_name="银行卡号")

    start_date = models.DateTimeField(verbose_name="认定日期")

    administrative_division = models.CharField(max_length=64, verbose_name="行政区划")


class LowIncomeMargin(models.Model):
    """
    低保边缘
    """
    fullname = models.CharField(max_length=24, verbose_name="户主姓名")

    id_card = models.CharField(max_length=24, verbose_name="身份证")

    registered_code = models.CharField(max_length=64, verbose_name="户籍编码")

    family_number = models.IntegerField(verbose_name="家庭人口")

    bank_card = models.CharField(max_length=24, verbose_name="银行卡号")

    administrative_division = models.CharField(max_length=64, verbose_name="行政区划编码")

    start_date = models.DateTimeField(verbose_name="认定日期")


class LowIncomeFamily(models.Model):
    """
    低收入家庭
    """
    community = models.CharField(max_length=24 , verbose_name="社区")

    fullname = models.CharField(max_length=24, verbose_name="户主姓名")

    id_card = models.CharField(max_length=24, verbose_name="身份证")

    family_number = models.IntegerField(verbose_name="家庭人口")

    family_income = models.FloatField(verbose_name="家庭总收入")

    low_description = models.TextField(verbose_name="致贫原因")

    start_date = models.DateTimeField(verbose_name="认定开始日期")

    end_date = models.DateTimeField(verbose_name="认定结束日期")

    description = models.TextField(verbose_name="备注")


class Agricultural(models.Model):
    """
    农业
    """
    tenant = models.CharField(max_length=24, verbose_name="承包户")

    id_card = models.CharField(max_length=24, verbose_name="身份证")

    registered_residence = models.CharField(max_length=128, verbose_name="户籍所在地")

    phone_number = models.CharField(max_length=12, verbose_name="电话")

    tenant_area = models.FloatField(verbose_name="租赁面积")

    tenant_price = models.FloatField(verbose_name="租金")

    group = models.CharField(max_length=12, verbose_name="组别")

    group_area = models.FloatField(verbose_name="组别面积")

    bank_card = models.CharField(max_length=24, verbose_name="银行卡号")


class Environment(models.Model):
    """
    环境
    """
    group = models.CharField(max_length=12, verbose_name="组别")

    fullname = models.CharField(max_length=24, verbose_name="户主")

    issue_status = models.CharField(max_length=12, verbose_name="发放情况")

    score = models.FloatField(verbose_name="考核分")

    description = models.TextField(verbose_name="备注")




















